<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>万座网旅游分销平台-宝贝预订</title>
<link href="../style/frame.css" rel="stylesheet" type="text/css" />
<link href="../style/common2.css" type="text/css" rel="stylesheet" />
<link href="../style/mainStyle.css" type="text/css" rel="stylesheet" />
<script src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="../js/common.js" type="text/javascript"></script>
<script src="../js/DoubleCalendar.js" type="text/javascript"></script>

</head>

<body>
<div class="mainbody" style="width:980px;">	
	<!--子目录导航-->
    <div class="subnav">您当前位置：订单修改</div>	
    
    <!--景点详细-->
    <div class="prod_detail">
		<div class="prod_d_left">
        	<div class="p_d_l_module">
                <div class="p_d_l_title"><span style="font-size:14px;"> 订单信息</span></div>
                <div class="p_d_l_cont">
                	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="m_tab">
                      
                      <tr>
                        <td width="15%" class="mt1">下单状态：</td>
                        <td width="85%"><?php echo $ord->getStatus($s);?></td>
                      </tr>
                      
                      <tr>
                        <td width="15%" class="mt1">下单日期：</td>
                        <td width="85%"><?php echo date('Y-m-d H:i:s',$detail['Tord_createtime']);?></td>
                      </tr>
                      
                    </table>

                </div>
            </div>
            
            <div class="ord_fy" style="text-align:left; font-size:12px; height:auto; line-height:24px;">
            	<div class="ord_fy_title">预订信息修改</div>
                <div class="ord_fy_cont">
                	10张以内需提前1天预订，10张或以上需提前1天预订可享受更低优惠，要求必须在线支付。
支付方式：您在提交订单并成功支付票款后，系统会自动给您手机发确认短信
取票地点：在温泉前台
取票凭证：报预订人名字凭身份证取票
修改取消：在系统未确认前，您可通过邮箱收到的订单通知来修改(取消、改期)订单；系统一经确认，您的订单不再接受任何因素的变更和取消（此门票当天有效）
发票须知：通过本站预订优惠门票，本站与景区均不提供发票
                </div>
            </div>
            <form name="ordF" id="ordF" method="post" action="order.php?act=msend">
        	<div class="p_d_l_module">
                <div class="p_d_l_title"><span style="font-size:14px;"> 宝贝预订</span></div>
                <div class="p_d_l_cont">
                 
                 	<input type="hidden" name="id" value="<?php echo $id;?>" />
                    <input type="hidden" name="s" value="<?php echo $s;?>" />
                	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="m_tab">
                      
                      <tr>
                        <td width="15%" class="mt1">游玩日期：</td>
                        <td width="85%">
                        	 <input type="text" name="data[Tord_playdate]" onfocus="ShowTwoMonthList(this,0,'thisDay');" value="<?php echo date('Y-m-d',$detail['Tord_playdate']);?>" class="ord_in_c" />
                        	<!--<select name="data[Tord_playdate]">
                        	<?php if($dateList){ foreach($dateList as $d){?>
                        	<option value="<?php echo strtotime($d);?>" <?php if(strtotime($d)==$detail['Tord_playdate']){?>selected="selected"<?php }?>><?php echo $d;?></option>
                            <?php }} ?>
                        	</select>-->
                        </td>
                      </tr>
                      
                      <tr>
                        <td colspan="2" style="border-bottom:none; padding:0px;">
                        	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin:0px;">
                              <tr>
                                <td width="40%" class="mt2">产品名称</td>
                                <td width="14%" class="mt2">数量</td>
                                <td width="11%" class="mt2">结算价</td>
                                <td width="13%" class="mt2">零售价</td>
                                <td width="11%" class="mt2">结算金额</td>
                                <td width="11%" class="mt2">销售利润</td>
                              </tr>
                              <tr>
                                <td style="border-bottom:none;"><a href="products.php?act=detail&aid=<?php echo $aid;?>&id=<?php echo $id;?>" target="_blank"><?php echo $proDetail['Tkt_name']; ?></a></td>
                                <td style="border-bottom:none;"><input type="text" name="data[Tord_num]" id="num" value="<?php echo $detail['Tord_num'];?>" class="ord_input" onkeyup="changeNum(this.value)" /> 张</td>
                                <td style="border-bottom:none;"><span class="num_color"><?php echo $detail['Tord_price3']; ?><input type="hidden" name="data[Tord_price3]" value="<?php echo $detail['Tord_price3']; ?>" id="settlement" /></span>元</td>
                                <td style="border-bottom:none;"><input type="text" name="data[Tord_price2]" id="retail" value="<?php echo $detail['Tord_price2']; ?>" class="ord_input" onkeyup="changeRetail(this.value)" /> 元</td>
                                <td style="border-bottom:none;"><span class="num_color" id="sumPrice"><?php echo $detail['Tord_price3']*$detail['Tord_num']; ?></span>元</td>
                                <td style="border-bottom:none;"><span class="num_color" id="profit"><?php echo ($detail['Tord_price2']-$detail['Tord_price3'])*$detail['Tord_num']; ?></span>元</td>
                              </tr>
                              
                            </table>

                        </td>
                      </tr>	
                    </table>

                </div>
            </div>
            <div class="ord_tip"><span class="num_color">*声明</span>：建议按照统一的建议零售价格进行销售，如果违反规定被查出，将取消分销资格，同时造成的一切后果自负。</div>
             <div class="ord_fy">订单总计费用：<span class="num_color" style="font-size:20px;" id="sumPrice2"><?php echo $detail['Tord_price3']*$detail['Tord_num']; ?></span> 元 <?php if($proDetail['Tkt_shipping']==1){?> + 运费<span class="num_color" style="font-size:20px;"><?php echo $proDetail['Tkt_freight'];?></span>元<?php }?> </div>
            <div class="p_d_l_module" style="border-top:2px solid #AECDEC;">
                <div class="p_d_l_title"><span>  游客资料录入</span></div>
<div class="p_d_l_cont pd2" style="padding:0px;">
               	 <div class="pp1"><span class="num_color">注：</span>(必须输入游客资料，如资料有误，导致游客预订失败，供应商不承担责任。) </div>
                 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="m_tab" style=" margin:0px;">
                      
                      <tr>
                        <td width="15%" class="mt1">游玩姓名：</td>
                        <td width="85%" valign="middle"><input type="text" name="data[per_name]" id="per_name" class="ord_in_c" value="<?php echo $detail['per_name'];?>" /> <span class="num_color">*</span> <span>(请填写全名，部分产品需要凭真实姓名验证。)</span></td>
                      </tr>
                       <?php if($proDetail['Tkt_needPhone']==1){?>
                      <tr>
                        <td width="15%" class="mt1">游客手机：</td>
                        <td width="85%"><input type="text" name="data[per_phone]" id="per_phone"  class="ord_in_c"  value="<?php echo $detail['per_phone'];?>"/> <span class="num_color">*</span> <span class="num_color" style="font-weight:normal;">此产品需要给客人发送短信，手机号码必填。</span></td>
                      </tr>
                      <?php }?>
                       <?php 
                      	if($proDetail['Tkt_needCard']==1){
                      ?>
                      <tr>
                        <td width="15%" class="mt1">证件类型：</td>
                        <td width="85%"><select name="data[per_cardtype]">
<option value="身份证" <?php if($detail['per_cardtype']=='身份证'){?>selected="selected"<?php }?>>身份证</option><option value="学生证"  <?php if($detail['per_cardtype']=='学生证'){?>selected="selected"<?php }?>>学生证</option><option value="军官证"  <?php if($detail['per_cardtype']=='军官证'){?>selected="selected"<?php }?>>军官证</option><option value="护照"  <?php if($detail['per_cardtype']=='护照'){?>selected="selected"<?php }?>>护照</option><option value="户口本"  <?php if($detail['per_cardtype']=='户口本'){?>selected="selected"<?php }?>>户口本(儿童请选择此项)</option><option value="港澳通行证"  <?php if($detail['per_cardtype']=='港澳通行证'){?>selected="selected"<?php }?>>港澳通行证</option><option value="台胞证"  <?php if($detail['per_cardtype']=='台胞证'){?>selected="selected"<?php }?>>台胞证</option>
</select> <span class="num_color">*</span></td>
                      </tr>
                      <tr>
                        <td width="15%" class="mt1">证件号码：</td>
                        <td width="85%"><input type="text" name="data[per_cardno]" id="per_cardno"  class="ord_in_c"  value="<?php echo $detail['per_cardno'];?>" style="width:300px;" /> <span class="num_color">*</span> <span>(儿童只需要输入出生年月)</span></td>
                      </tr>
                      <?php }?>
                      <?php 
                      	if($proDetail['Tkt_needAddr']==1){
                      ?>
                      <tr>
                        <td width="15%" class="mt1">邮寄地址：</td>
                        <td width="85%"><input type="text" name="data[Tord_address]" value="<?php echo $detail['Tord_address'];?>" id="Tord_address"  class="ord_in_c" style="width:300px;" /> <span class="num_color">*</span> <span>(请正确填写邮件地址以保证能正确送到)</span></td>
                      </tr>
                      <?php }?>
                      <?php 
                      	if($proDetail['Tkt_needCode']==1){
                      ?>
                      <tr>
                        <td width="15%" class="mt1">邮政编码：</td>
                        <td width="85%"><input type="text" name="data[Tord_code]"  value="<?php echo $detail['Tord_code'];?>" id="Tord_code"  class="ord_in_c" style="width:160px;" /> <span class="num_color">*</span> <span>(请正确填写邮件地址以保证能正确送到)</span></td>
                      </tr>
                      <?php }?>
                      <?php if($proDetail['Tkt_shipping']==1){?>
                      <tr>
                        <td width="15%" class="mt1">快递费用：</td>
                        <td width="85%"> <span style="font-size:16px; font-weight:bold; color:#F60;"><?php echo $proDetail['Tkt_freight'];?></span> 元  <span>(江浙沪快递费用一律<?php echo $proDetail['Tkt_freight'];?>元，如是外省偏远地区请补快递费用)</span></td>
                      </tr>
                      <?php }else{?>
                      
                      <tr>
                        <td width="15%" class="mt1" valign="top">短信模板：</td>
                        <td width="85%"> <textarea style="width:450px; height:80px;"><?php echo $proDetail['Tkt_msg_mdl'];?></textarea></td>
                      </tr>	
                      
                      <?php }?>
                    </table>
                    
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="m_tab" style="border-top:none;" >
              <tr>
                <td class="mt2"> 订单备注（录入客人的一些情况和需求，价格信息备注无效。）</td>
              </tr>
              <tr>
                <td style="border-bottom:none; padding:8px;">
                	<textarea name="data[per_beizhu]" style="width:600px; height:100px;"><?php echo $detail['per_beizhu'];?></textarea>
                </td>
              </tr>
                      
            </table>
            
          </div>
            </div>
            
            
            <div style="height:80px; text-align:center; padding-top:9px;"><input type="button" value=" " style="background:url(<?php echo ADMINI_TPL;?>images/submit_btn_big2.png) no-repeat; width:180px; height:32px; border:none;" onclick="ordSubmit()" /></div>
            </form>
      <div class="p_d_l_module" style="border-top:1px solid #DBDBDB; border:1px solid #DBDBDB;">
                <div class="p_d_l_title" style="background:#f0f0f0;"><span>产品预订协议</span></div>
				<div class="p_d_l_cont pd2" style="padding:10px; height:240px; overflow-y:auto; overflow-x:hidden;">
                	【支付方式】 
                    此产品属线上支付产品，支持网银、支付宝支付，支付成功后订单有效；
                    在提交订单并成功支付票款后，系统自动给您手机发送预订成功短信（请确保预留手机电话畅通）。
                    
                    【取票验票】 
                    1、凭游玩前收到的电子码，于游玩当天在景区验证消费；
                    2、如没收到二维码，可以直接刷预订人二代身份证验证入园。
                    
                    
                    
                    【退改须知】
                    
                    1、如需要修改、变更或取消已成功预定的订单，必需最晚在游玩前一天18：00点之前联系客服中心申请变更，逾时不接受任何原因的修改、变更或取消；
                    2、通过您注册邮箱中预定产品确认通知单的网络链接地址，直接修改，即可变更订单。
                    
                    【注意事项】
                    预定时的"游客姓名"与"手机号码"请认真填写；
                    姓名、手机确认短信和手机号码是取票凭证，由于信息不准确而产生的损失，由游客自己承担。
                    
                    【发票说明】
                    通过本站预订优惠门票，本站与景区均不提供发票。

                </div>
            </div>
        </div>
        <div class="prod_d_right">
        	<div class="p_d_r_module">
                <div class="p_d_r_title">在线服务支持</div>
                <div class="p_d_r_cont">
                	<p>QQ：<a style="font-size:12px; text-decoration:none; color:#0080C0;" href="tencent://message/?uin=810888691&amp;Site=%C2%F6%C8%A6%CD%F8%D5%BE%BD%A8%C9%E8&amp;Menu=yes"><img src="<?php echo ADMINI_TPL;?>images/QQ.png" /></a> </p>
					<!--<p>电话：<span class="num_color" style="font-size:16px;">0512-66504226</span></p>-->
                </div>
            </div>
            <div class="process">
            	<img src="<?php echo ADMINI_TPL;?>images/process.gif" alt="万座网预订流程" />
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<script>
	//更改数量
	function changeNum(val){
		if(checkRate(val)==false){
			alert('请填写正确的数字');
			return false;
		}	
		var sumPrice=$("#settlement").val()*val;//总价
		var profit=($("#retail").val()-$("#settlement").val())*val;//利润
		$("#sumPrice").html(sumPrice);
		$("#sumPrice2").html(sumPrice);
		$("#profit").html(profit);
	}
	
	//更改销售价格
	function changeRetail(val){
		if(checkRate(val)==false){
			alert('请填写正确的数字');
			return false;
		}
		var profit=(val-$("#settlement").val())*$("#num").val();//利润
		$("#profit").html(profit);
	}
	
	
	//判断数字是否为正整数
	function checkRate(val)
	{
		 var re = /^[0-9]+.?[0-9]*$/;   //判断字符串是否为数字     //判断正整数 /^[1-9]+[0-9]*]*$/   
		 if (!re.test(val))
		{
			return false;
		 }
	}
	
	function ordSubmit(){
		if($("#num").val()==''){
			alert('请填写预订数量');
			return false;
		}
		if(checkRate($("#num").val())==false){
			alert('请填写正确的预订数量');
			return false;
		}
		if($("#retail").val()==''){
			alert('请填写零售价格');
			return false;
		}
		if(checkRate($("#retail").val())==false){
			alert('请填写正确的零售价格');
			return false;
		}
		if($("#per_name").val()==''){
			alert('请填写游客姓名');
			$("#per_name").focus();
			return false;
		}
		if($("#per_phone").val()==''){
			alert('请填写游客手机');
			$("#per_phone").focus();
			return false;
		}
		<?php 
		  if($proDetail['Tkt_shipping']==0){
		?>
		if($("#per_cardno").val()==''){
			alert('请填写证件号码');
			$("#per_cardno").focus();
			return false;
		}
		<?php }else{?>
		if($("#Tord_address").val()==''){
			alert('请填写邮件地址');
			$("#Tord_address").focus();
			return false;
		}
		if($("#Tord_code").val()==''){
			alert('请填写邮政编码');
			$("#Tord_code").focus();
			return false;
		}
		<?php }?>
		$("#ordF").submit();
	}

</script>
<!-- 7caihu.com Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb8797ecb21d1ccb839c35b190277a0cd' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>
